package cn.support.neo.mvp.core.di.module;

import android.content.Context;

import com.github.pwittchen.prefser.library.Prefser;

import javax.inject.Singleton;

import cn.support.neo.mvp.core.di.qualifier.ForApplication;
import cn.support.neo.mvp.core.provider.GuestTokenProvider;
import cn.support.neo.mvp.core.service.client.HttpClient;
import cn.support.neo.mvp.model.CommonModel;
import dagger.Module;
import dagger.Provides;

@Module(includes = AppModule.class)
public class ApiModule {

    @Provides
    @Singleton
    CommonModel provideCommonModelGuest(@ForApplication Context context, HttpClient httpClient, Prefser prefser) {
        return new CommonModel(context, httpClient, new GuestTokenProvider(prefser), prefser);
    }

}